﻿<!DOCTYPE html>
<!--销核情况说明-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>
<body>
    <div id="app" v-cloak  class="popupW150">
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="140px"
                 size="mini">
            <el-row>
                <el-col :span="24">
                    {{ContractorAdmissionTool.CarryingToolName+mark.m}}{{Form.CarryingToolName}}
                </el-col>
            </el-row>

            {{Form.CarryingToolList}}
            <el-row style=" padding-top:20px">
                <el-form-item :label="ContractorAdmissionTool.SituationStatement+mark.m" prop="SituationStatement">
                    <el-input type="textarea" v-model="Form.SituationStatement" autocomplete="off"></el-input>
                </el-form-item>
            </el-row>

            <el-row type="flex" justify="end">
                <el-form-item>
                    <el-button type="primary" @click="onSubmitForm()">{{col.btnSave}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                id: '',
                //业务表单内容
                Form: {
              
                    CarryingToolName: '',//携带工具名称
                    CarryingToolQuantity: '',//入场携带工具数量
                    IsConsumables: '',//是否为消耗品
                    SituationStatement: '',
                    CarryingToolList:[],
                },
                IsConsumables: [],

                //表单验证
                rules: {
                    PersonnelName: [
                        verification.NotNull,
                        { pattern: verification.StringLengthAtoB.t.format(2, 5), message: verification.StringLengthAtoB.m.format(2, 5), trigger: 'blur' }
                    ],
                    ContractorName: [
                        verification.NotNull,
                        { pattern: verification.StringLengthAtoB.t.format(5, 50), message: verification.StringLengthAtoB.m.format(5, 10), trigger: 'blur' }
                    ]
                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                getData: function () {
                    getData(this, '/api/ContractorAdmissionTool/getxiaohe?id=' + this.id);
                },

                handleChange: function (value) {
                    console.log(value);
                },
                handleChangeA: function (value) {
                    console.log(value);
                },
                //提交数据
                onSubmitForm: function () {
                    var s = parent.app.Form.CarryingToolList;
                    for (var i = 0; i < s.length; i++) {
                        if (this.id == s[i].id) {
                            s[i].SituationStatement = this.Form.SituationStatement;
                        }
                    }
                    parent.app.ListItem.dialogVisible = false;
                },
            },
            mounted: function () {
                this.IsConsumables = getDicData('50');
                this.id = getUrlParam("id");
                this.getData();
            }
        });
    </script>
</body>

</html>